Promise.resolve()
  .then(() => {
    console.log(0)
    //1.直接return一个值xxx,相当于resolve(xxx), 0 1 4 2 3 5 6
    //return 4

    //2.return一个thenable,会将该次resolve的微任务往后推迟1次
    // 0 1 2 4 3 5 6
    // return {
    //   then: (resolve) => {
    //     resolve(4)
    //   },
    // }

    //3.return一个Promise 会将该次resolve的微任务往后推迟2次
    //0 1 2 3 4 5 6
    return Promise.resolve(4)
  })
  .then((res) => {
    console.log(res)
  })

Promise.resolve()
  .then(() => {
    console.log(1)
  })
  .then(() => {
    console.log(2)
  })
  .then(() => {
    console.log(3)
  })
  .then(() => {
    console.log(5)
  })
  .then(() => {
    console.log(6)
  })
